import { upload } from '@/utils/request'

// 上传单张图片
export const uploadImageAPI = (filePath) => {
  return upload('/api/upload/image', filePath, 'image')
}

// 批量上传图片
export const uploadMultipleImagesAPI = (filePaths) => {
  const promises = filePaths.map(filePath => uploadImageAPI(filePath))
  return Promise.all(promises)
}

// 上传头像
export const uploadAvatarAPI = (filePath) => {
  return upload('/api/upload/avatar', filePath, 'avatar')
} 